//
// File:   parser.h
// Author: vileda
//
// Created on 22. Januar 2008, 03:12
//

#ifndef _PARSER_H
#define	_PARSER_H

#include <fstream>
#include <boost/smart_ptr.hpp>
#include <boost/spirit.hpp>
#include <boost/spirit/actor.hpp>
#include "processor.h"

using namespace std;
using namespace boost;
using namespace boost::spirit;

class Parser {


  public:
    Parser(const char * filename, Processor * processor);
    ~Parser();
    bool parse(const char * line);


  private:
    ifstream sourcefile;
    rule<> expression, instruction, src, dst, comment, preprocessor, val, definition;
    string pSrc, pDst, pIns, pVarName, pDefinition, pVarRegister;
    //boost::shared_ptr<Processor> p;
    parse_info<> pI;
    Parser(const Parser &obj);


};

#endif	/* _PARSER_H */

